/**
 * ATuanZhang
 */
package com.atuanzhang;

import java.util.List;

import org.huanglei.android.application.AndroidApplication;
import org.huanglei.android.inject.module.AbstractAndroidModule;
import org.huanglei.android.inject.provider.AndroidHttpClientProvider;
import org.huanglei.android.util.AndroidHttpClient;

import com.atuanzhang.cache.Cache;
import com.atuanzhang.cache.CacheImpl;
import com.atuanzhang.service.CityService;
import com.atuanzhang.service.GoodsService;
import com.atuanzhang.service.impl.CityServiceImpl;
import com.atuanzhang.service.impl.GoodsServiceImpl;

/**
 * @author huanglei
 * @date 2011-4-2 @
 */
public class ATuanZhangApplication extends AndroidApplication {

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.huanglei.android.application.AndroidApplication#addApplicationModules
	 * (java.util.List)
	 */
	@Override
	protected void addApplicationModules(List<AbstractAndroidModule> modules) {
		modules.add(new AbstractAndroidModule() {

			@Override
			protected void configure() {
				bind(GoodsService.class).to(GoodsServiceImpl.class);
				bind(CityService.class).to(CityServiceImpl.class);
				bind(AndroidHttpClient.class).toProvider(
						AndroidHttpClientProvider.class);
				bind(Cache.class).to(CacheImpl.class);

			}
		});

	}

}
